def formatParam(data:dict|list[dict],remove:list[str]=list(),need:list[str]=list()):
    if type(data) == dict:
        if(len(need)>0):
            data = {key: value for key, value in data.items() if ((key not in remove) and (key in need))}
        else:
            data = {key: value for key, value in data.items() if key not in remove}
        return data
    elif type(data) == list:
        if(len(need)>0):
            data =[{key: value for key, value in item.items() if ((key not in remove) and (key in need))} for item in data]
        else:
            data = [{key: value for key, value in item.items() if key not in remove} for item in data]
        return data
    
def authParam(data:any,required:list[any]):
    if(data == None):
        return True
    return data in required